/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.eurotrader.dao;

import java.util.List;
import java.util.Map;


/**
 *
 * @author Anjo
 */

public interface BaseDao<T,  ID> {

    public abstract T save(T entidade);

    public abstract T getByID(ID id);

    public abstract void delete(T entidade);

    public abstract void update (T entidade);

    public abstract List<T> getAll();

    public abstract List pesq(String query, String ordenacao);

    public abstract T getResultadoSimples(String query);

    public abstract Boolean encontrouRegistro(String query);

    public abstract List<T> getByField(String campo, String texto);

    public abstract List<T> listPesqParam(String query, Map<String, Object> params, int maximo, int atual);

    public abstract List<T> listPesqParam(String query, Map<String, Object> params);

    public abstract T listPesqParamSimples(String query, Map<String, Object> params);
            
    public abstract Long getTotalDeRegistros();

    public abstract Long getTotalDeRegistros(String sql);

    public abstract List<T> todosRegistrosPaginados(int maximo, int atual);

    public abstract List todosRegistrosPag(int maximo, int atual, String sql);

    public abstract Object getPorCampo(String campo, String texto);

    public abstract Object getResultSimples(String query);

    public abstract void excluiTodos(String sql);

    public abstract Long numeroDeRegistros(String sql);

    public abstract Object getPrimeiroResultado(String query, String ordenacao);
    
    public List ultimosRegistros(int maximo, String clausulaSql);

}
